cast int to enum type c#

44

cast int to enum type c# -

YourEnum foo = (YourEnum)Enum.ToObject(typeof(YourEnum) , yourInt);

cast int to enum type c# -

YourEnum foo = (YourEnum)yourInt;

Comments

Submit
0 Comments